package com.powerhua.cms.domain.logic;

import java.util.List;

import com.powerhua.cms.domain.Content;
import com.powerhua.cms.persistence.dao.ContentDao;

public class ContentManagerImpl implements ContentManager {
	
	private ContentDao contentDao;


	public ContentDao getContentDao() {
		return contentDao;
	}


	public void setContentDao(ContentDao contentDao) {
		this.contentDao = contentDao;
	}


	public void insertContent(Content c) {
		contentDao.create(c);
	}


	public List getContentsByUserId(String userId) {
		List list = contentDao.getContentsByUserId(userId);
		return list;
	}


	public void updateContent(Content c) {
		// TODO Auto-generated method stub
		
	}
	
	public Content getContentById(String contentId) {
		Content c = contentDao.getContentById(contentId);
		return c;
	}


	public List getContentByCategoryId(String categoryId, String userId) {
		List list = contentDao.getContentsByCategoryId(categoryId, userId);
		return list;
	}

}
